﻿using com.nm.interfaces;

namespace com.nm.library.Factorys
{
    /// <summary>
    /// 工厂管理，提供所有实现的工厂引用
    /// </summary>
    public static class FactoryManager
    {
        /// <summary>
        /// 配置信息存储
        /// </summary>
        public static IConfigurationFactory ConfigurationFactory
            => FactoryMaker.Get<IConfigurationFactory>("ding-ConfigurationFactory", "com.nm.library.Factorys.RedisConfigurationFactory,com.nm.library");

        /// <summary>
        /// 任务管理
        /// </summary>
        public static ITaskFactory TaskFactory
            => FactoryMaker.Get<ITaskFactory>("task-factory", "com.nm.library.Factorys.TaskFactory,com.nm.library");

        /// <summary>
        /// 用户操作（属性）
        /// </summary>
        public static IUserFactory UserFactory
            => FactoryMaker.Get<IUserFactory>("user-facotry", "com.nm.db.MemberShipFactory,com.nm.db");

        /// <summary>
        /// OSS存储
        /// </summary>
        public static IOssClient OssFactory
            => FactoryMaker.Get<IOssClient>("OSS-Factory", "AlOss.OssClientFactory,AlOss");
    }
}